package duotai;
class A{
    int x;
    String y;

    public A(int x, String y) {
        this.x = x;
        this.y = y;
    }

    public void fun1(){
        System.out.println("fun1");
    }
}
class B extends A{
    String color;
    public B(int x, String y, String color) {
        super(x, y);
        this.color = color;
    }
    public void fun2(){
        System.out.println("fun2");
    }
    public void fun1(){
        System.out.println("子类的fun1");
    }
}
public class Dutai {
    public static void main(String[] args) {
        A a =new B(1,"y","蓝色");
        a.fun1();
    }
}
